#include "BinTree.h"

template <typename T>
BinNode<T> *BinTree<T>::insertAsRoot(const T &e){
	_size = 1;
	return _root = new BinNode<T>(e);
}

template <typename T>
BinNode<T> *BinTree<T>::insertAsLC(BinNode<T> *x,const T &e){
	++_size;
	x->insertAsLC(e);
	updateHeightAbove(x);
	return x->lc;
}

template <typename T>
BinNode<T> *BinTree<T>::insertAsRC(BinNode<T> *x,const T &e){
	++_size;
	x->insertAsRC(e);
	updateHeightAbove(x);
	return x->rc;
}

//template <typename T>
//int BinTree<T>::updateHeight(BinNode<T> *x){
//	return x->height = 1 + max(stature(x->lc),stature(x->rc));
//}
//
//template <typename T>
//void BinTree<T>::updateHeightAbove(BinNode<T> *x){
//	while(x){
//		updateHeight(x);
//		x->parent;
//	}
//}


template <typename T>
int BinTree<T>::remove(BinNode<T> *x){

}


